A deadlock occurs in a database when two or more processes have already a resource locked, and then each process wants to acquire a lock on the resource.
A deadlock occurs when two or more tasks permanently block each other by each task having a lock on a resource that the other tasks are trying to lock.
An order of operation deadlock is when two processes hold a lock that the other requires. Say you have a Customer table, an Orders table, and processes A and B.
A deadlock occurs when two (or more) processes lock the separate resource. Under these circumstances, each process cannot continue and begins to wait for ...